<?php if(Yii::app()->user->isGuest): ?>
    <a href="javascript:void(0);" onClick="App.showRegisterBox();">Đăng ký</a>
    <span>|</span>
    <a href="javascript:void(0);" onClick="App.showLoginBox();">Đăng nhập</a>
<?php else: ?>
	<?php $profile = Users::getInstance()->getProfile(Yii::app()->user->id); ?>
    <div class="box_upload">
        <a href="javascript:void(0);" onClick="App.showUpload();">upload deal</a>
    </div>
    <div class="box_cvUser">            	
        <span class="ava_user"><img src="<?php if(!empty($profile['profile_image'])): echo $profile['profile_image']; else: echo 'images/avatar.jpg'; endif; ?>" width="28px" height="28px" /></span>
        <!--<span class="name_user">GREEN TEA</span>-->
        <div class="box_acc_setting">
            <a href="javascript:;" class="ico_all icon_2peo"><em></em></a>
            <div class="accUser_seting">
                <!--<a href="#">Hồ sơ của bạn</a>
                <a href="#">Thay đổi thông tin</a>
                <a href="#">Tìm bạn bè</a>-->
                <a href="/auth/logout">Đăng xuất</a>
            </div>
        </div>            
    </div>
<?php endif; ?>